package org.ljy.rabbitextensionsdemo.listener;

import org.ljy.rabbitextensionsdemo.constant.Constant;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class DelayListener {

    @RabbitListener(queues = Constant.DELAY_QUEUE)
    public void delayListener() {
        System.out.println("消息时间："+new Date() + "|");
    }

}
